Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reentrancy guard to claimPrizes #32

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

trmid
Copy link
Member

@trmid trmid commented Jun 27, 2024

Prevents custom vaults and vault hooks from reentering the claimPrizes function.

The storage-based reentrancy contract from Open Zeppelin is being used. This can later be replaced with the transient storage version to save on gas costs for future deployments; however many L2s do not yet support the opcodes necessary.

Copy link

linear bot commented Jun 27, 2024

@trmid trmid changed the base branch from main to fix-review June 27, 2024 14:00
Copy link

LCOV of commit 0651d14 during Tests with 100% Coverage #154

Summary coverage rate:
  lines......: 100.0% (89 of 89 lines)
  functions..: 100.0% (18 of 18 functions)
  branches...: no data found

Files changed coverage rate:
                                  |Lines       |Functions  |Branches    
  Filename                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================
  src/Claimer.sol                 | 100%     58| 100%    12|    -      0

@trmid trmid merged commit 7416bb3 into fix-review Jun 28, 2024
2 checks passed
@trmid trmid deleted the gen-1796-73-add-reentrancy-guard-to-claimprizes branch July 15, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant